package com.zzb.framework.role.entity;

import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.zzb.framework.common.BaseEntity;
import com.zzb.framework.validator.annotation.ValidateNotNull;


/**
* 角色表 实体类
*/
@TableName(value = "t_sys_role")
public class SysRole extends BaseEntity<String> {
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    @ValidateNotNull(msg = "角色名不能为空")
    @TableField(value = "role_name")
    private String roleName; //角色名
    @ValidateNotNull(msg = "角色代码不能为空")
    @TableField(value = "role_code")
    private String roleCode; //角色代码

    /*----------------------get set 方法----------------------*/
    public String getId() {return id;}
    public void setId(String id) {this.id = id;}
    public String getRoleName() {return roleName;}
    public void setRoleName(String roleName){this.roleName = roleName == null ? null : roleName.trim();}
    public String getRoleCode() {return roleCode;}
    public void setRoleCode(String roleCode){this.roleCode = roleCode == null ? null : roleCode.trim();}
    /*----------------------toString 方法----------------------*/
    @Override
    public String toString() {
        return "SysRole{" +
        "id='" + getId() + '\'' + ',' + 
        "roleName='" + getRoleName() + '\'' + ',' + 
        "roleCode='" + getRoleCode() + '\'' + ',' + 
        "createTime='" + getCreateTime() + '\'' + ',' + 
        "creator='" + getCreator() + '\'' + ',' + 
        "updateTime='" + getUpdateTime() + '\'' + ',' + 
        "updater='" + getUpdater() + '\'' + ',' + 
        "activate='" + getActivate() + '\'' + 
        '}';
    }
}
